//import { PropsWithChildren } from 'react'
import Taro, { useLaunch } from '@tarojs/taro'
import '@tarojs/taro/html.css'
import 'taro-ui/dist/style/index.scss'
import { Provider } from 'react-redux'
import configStore from './store'
import './app.scss'

const store = configStore()
function App({ children }) {
  useLaunch(() => {
    console.log('App launched.')
    Taro.removeStorageSync('token')
  })

  // children 是将要会渲染的页面,将 store 作为其属性传入
  return <Provider store={store}>{children}</Provider>
}

export default App
